<{include file="admin_header.html"}>
	<script>
		$(document).ready(function() {
			/*
			*   弹出权限框
			*/ 

		$(".add").fancybox({
		maxWidth	: 300,
		maxHeight	: 400,
		fitToView	: false,
		width		: '70%',
		height		: '70%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none'
	   });
			
		});
	</script>
<body>  
<form name="myform" method="post" action="">
 <input type="hidden" name="selids" value=""/>
<table class="tab_list tab_bottom">
    <caption><a href="#">◆权限库管理</a> <a class='add fn-right fancybox.iframe' href='<{spUrl c=qx a=add}>'>添加</a></caption>
    <tr>
        <th class="checkbox"><input name="checkbox" type="checkbox" onclick="checkorno(this,this.form.catids)" /></th>
        <th>名称</th>
        <th>排序</th>
        <th class="td_action">操作</th>
    </tr>
<{function name=menu level=0}> 
<{for $i=0 to $i<$level*2-1}>    
<{$str=$str|cat:'　'}>
<{/for}>
<{if $level++}>
<{$str2= $str|cat:'├'}>
<{/if}>    
<{foreach $data as $entry}>
    <tr>
        <td class="checkbox"><input type="checkbox" name="catids" id="catids" value="<{$entry.acl_id}>"/></td>
        <td><{$str2}> [<{$entry.aclid}>.<{$entry.name}>]<{if isset($entry.child)}>+<{/if}></td>
        <td><input class="num" name="orderid[<{$entry.aclid}>]" type="text" value="<{$entry.sort}>"/></td>
        <td class="td_action">
        <a class='add fancybox.iframe' href='<{spUrl c=qx a=add aclid=$entry.aclid}>'>添加</a> | <a class='add fancybox.iframe' href='<{spUrl c=qx a=edit aclid=$entry.aclid}>'>修改</a> | <a href="<{spUrl c=qx a=del aclid=$entry.aclid}>" onClick="return confirm('确认删除此权限吗？')">删除</a>
        </td>
    </tr>
<{if isset($entry.child)}>           
<{call name=menu data=$entry.child level=$level}>           
<{/if}>             

<{/foreach}>     

<{/function}> 
<{call name=menu data=$arr}>
</table>
<div id="submit_float">
<button name="select1" onClick="selAll(this.form.catids)" type="button">全选</button>
   <button name="select2" onClick="noSelAll(this.form.catids)" type="button">反选</button>
   <button name="order" type="button" onClick="subform(this.form,this.form.catids,'<{spUrl c=qx a=order}>','')">栏目排序</button>
   <button name="order" type="button" onClick="subform(this.form,this.form.catids,'<{spUrl c=qx a=del}>','')">删除选中</button>
   <button name="reset" type="reset">重置</button>
</div>

</form>

<{include file="admin_footer.html"}>
</body>
</html>


